/*
--------------------------------------------------------------------------------
	This do file creates Tables S5 and S6 from the Supplementary Information of the paper
	"Lies in politics: A study of politicians' preferences for truth-telling".
	Before running this do file, readers should update the directory below 
	called "Home" to where the "ReplicationPackage" folder is located.
	
	Please note that due to standardization of the variables age,
	log population size and rounding of the variable margin2015, there is slight
	deviation in the decimals of the coefficients.
	
	Paper: "Lies in politics: A study of politicians' preferences for truth-telling"
	Authors: Katharina A. Janezic, Aina Gallego
	Corresponding author: Aina Gallego, agallego@ibei.org
	
	Last changed: June 6, 2020
--------------------------------------------------------------------------------
*/

*----- 0: Housekeeping
clear all
version 13
set more off

*------------------------------------------------------------------------------*
/* PLEASE UPDATE THE DIRECTORY HERE */
/* For Mac Users */
//cd "Users/.../Replication/code"

/* For Windows Users */
//cd "C:\...\Replication\code"
*------------------------------------------------------------------------------*


*------------------------------------------------------------------------------*
*----- 0: Load data
use "./dataRepl.dta", replace

*----- subsample used
drop if interestreport==. //5 observations
drop if honestytime_cutoff==1 //spent less or equal to 5 seconds on answering honesty question
drop if honestytime_cutoff==3 | honestytime_cutoff==4 //spent more than 90 seconds on answering honesty question



*------------------------------------------------------------------------------*
*---- 1: Regressions Table S5

*** Table S5(1)
quietly reg iscara interestreportYes gender, robust
predict fitval_gender1
eststo gender1_robustse

*** Table S5(2)
quietly reg iscara interestreportYes gender pop_log age margin2015, robust
predict fitval_gender2
eststo gender2_robustse

*** Table S5(3)
quietly reg iscara interestreportYes isMajorParty, robust
predict fitval_party1
eststo party1_robustse

*** Table S5(4)
quietly reg iscara interestreportYes isMajorParty pop_log age margin2015, robust
predict fitval_party2
eststo party2_robustse

*** Table S5(4)
quietly reg iscara interestreportYes gender isMajorParty pop_log age margin2015, robust
predict fitval_combined
eststo combined_robustse

*** Display and Export Tables
esttab gender* party* combined*, label se b(2) starlevels( * 0.10 ** 0.05 *** 0.01) mtitles("Rep. Heads" "Rep. Heads" "Rep. Heads" "Rep. Heads" "Rep. Heads")
esttab gender* party* combined* using tableS5.tex, replace label se b(2) starlevels( * 0.10 ** 0.05 *** 0.01) mtitles("Rep. Heads" "Rep. Heads" "Rep. Heads" "Rep. Heads" "Rep. Heads")


*------------------------------------------------------------------------------*
*---- 2: Regressions Table S6

*** Table S6(1)
quietly reg reelected iscara, robust
predict fitval_reelection1
eststo reelection1_robustse

*** Table S6(2)
quietly reg reelected iscara ranagain margin2015 gender pop_log b2.party, robust
predict fitval_reelection2
eststo reelection2_robustse

*** Table S6(3)
quietly reg reelected iscara ranagain margin2015 c.margin2015#iscara gender pop_log b2.party, robust
predict fitval_reelection3
eststo reelection3_robustse

*** Table S6(4)
quietly reg reelected iscara  margin2015 c.margin2015#iscara gender pop_log b2.party if ranagain==1, robust
predict fitval_altreelection
eststo altreelection_robustse

*** Display and Export Tables
esttab reelection* altreelection*, label se b(2) starlevels( * 0.10 ** 0.05 *** 0.01)
esttab reelection* altreelection* using tableS6.tex, replace label se b(2) starlevels( * 0.10 ** 0.05 *** 0.01)

